﻿@model IceTea.Domain.Models.PBI
@using IceTea.Infrastructure;

<!-- Title -->
<div class="form-group well well-sm">
    @Html.LabelFor(p => p.Title, new {@class="badge"})
    <div>
        @Html.TextBoxFor(p => p.Title, new {@class="form-control", autofocus="autofocus"})
    </div>
</div>
<!-- PBI type, Priority, State  -->
<div class="well well-sm">
    <div class="row">
        <div class="col-md-4">
        @Html.LabelFor(p => p.Type, new{@class="badge"})
        </div>
        <div class="col-md-4">
        @Html.LabelFor(p => p.Priority, new{@class="badge"})
        </div>
        <div class="col-md-4">
        @Html.LabelFor(p => p.State, new{@class="badge"})
        </div>
    </div>
    <div class="row">
        <div class="col-md-4">
        @Html.DropDownListFor(p => p.Type,
            new List<SelectListItem>() {
                new SelectListItem(){ Text="Epic", Value="0"},
                new SelectListItem(){ Text="User Story", Value="1"}
            }, 
            new {@class="form-control" })
        </div>
        <div class="col-md-4">                        
        @Html.DropDownListFor(p => p.Priority,
            new List<SelectListItem>(){
                new SelectListItem(){Text="Very High", Value="1"},
                new SelectListItem(){Text="High", Value="2"},
                new SelectListItem(){Text="Medium", Value="3"},
                new SelectListItem(){Text="Low", Value="4"},
                new SelectListItem(){Text="Very Low", Value="5"}
            },
            new { @class="form-control"})
        </div>
        <div class="col-md-4">
            @Html.DropDownListFor(p => p.State,
                new List<SelectListItem>()
                {
                    new SelectListItem(){Text="Initialized", Value="1"},
                    new SelectListItem(){Text="Sprint Ready", Value="2"},
                    new SelectListItem(){Text="Completed", Value="3"},
                    new SelectListItem(){Text="Obsoleted", Value="4"}
                }, new {@class="form-control" })
        </div>
    </div>
</div>

<!-- User Role, Description and Business Value -->
<div class="well well-sm">
    <div class="row">
        <div class="col-md-6">
            <div class="form-group">
                @Html.LabelFor(p => p.UserRole, new {@class="badge"})
                <div>
                    @Html.ComboBoxFor(p => p.UserRole, new List<string>(){
                        "End User", "Product Owner", "Scrum Master"}, 
                        null)                            
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(p => p.BusinessValue, new{@class="badge"})
            <div>
                @Html.TextAreaFor(p => p.BusinessValue, 4, 20, new{@class="form-control"})
            </div>
            </div>                                
        </div>
        <div class="col-md-6">
            <div class="form-group">
                @Html.LabelFor(p => p.Description, new{@class="badge"})
                <div>
                    @Html.TextAreaFor(p => p.Description, 7, 20, new{@class="form-control"})
                </div>
            </div>
        </div>
    </div>
</div>

<!-- tabs -->
<ul class="nav nav-tabs">
    <li class="active"><a href="#tab1" data-toggle="tab" id="tabhead1">Size Estimation</a></li>
    <li><a href="#tab2" data-toggle="tab" id="tabhead2">Acceptance Tests</a></li>
    <li><a href="#tab3" data-toggle="tab" id="tabhead3">Attachments</a></li>
    <li><a href="#tab4" data-toggle="tab" id="tabhead4">Conversation</a></li>
    <li><a href="#tab5" data-toggle="tab" id="tabhead5">Related PBIs</a></li>
    <li><a href="#tab6" data-toggle="tab" id="tabhead6">Update History</a></li>
</ul>
<p></p>
<div class="tab-content">
    <!-- Estimation tab -->
    <div class="tab-pane active" id="tab1">
        <div class="well well-sm">
        <div class="row">
            <div class="col-md-6">
                @Html.LabelFor(p => p.Estimation, new{@class="badge"})
                @Html.TextBoxFor(p => p.Estimation, new{@class="form-control"})
            </div>
            <div class="col-md-6">
                @Html.LabelFor(p => p.SizeUnit, new{@class="badge"})
                @Html.DropDownListFor(p => p.SizeUnit,
                    new List<SelectListItem>()
                    {
                        new SelectListItem(){Text="Story Points", Value="1"},
                        new SelectListItem(){Text="Months", Value="2"},
                        new SelectListItem(){Text="Weeks", Value="3"}
                    }, new { @class="form-control"})
            </div>
        </div>
        </div>
    </div>
    <!-- Acceptance test -->
    <div class="tab-pane" id="tab2">
        <div class="well well-sm">

        </div>
    </div>
</div>